package com.ocom.payconfig.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.ocom.common.entity.card.EntityXfShoppingCart;
import com.ocom.common.vo.payconfig.GetDishesFormCartVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface IDaoXfShoppingCart extends BaseMapper<EntityXfShoppingCart> {

    @Select("select  c.*,merch_name  from  xf_shopping_cart  c " +
            "left  join  xf_merchant_info m  on  c.com_id =m.com_id  and  c.merch_id =m.merch_id  ${ew.customSqlSegment}")
    List<GetDishesFormCartVo> getDishesFormCart(@Param(Constants.WRAPPER) Wrapper wrapper);
}
